#pragma once
#include"public_struct.h"
bool checkPerfectNumber(int num) {
	int sum = 0;
	for (int i = 1; i*i <= num; ++i) {
		if (num%i == 0) {
			sum = sum + num / i + i;
		}
	}
	if (sqrt(num)*sqrt(num) == num) sum -= sqrt(num);
	return num * 2 == sum ? true : false;
}